export default function(sequelize, DataTypes) {
  return sequelize.define('group_announce', {
    _session_id: {
      type: DataTypes.STRING(25),
      allowNull: false,
      primaryKey: true
    },
    _announce: {
      type: DataTypes.STRING(500),
      allowNull: true
    },
    _timestamp: {
      type: DataTypes.STRING(25),
      allowNull: true,
      comment: "创建公告时间"
    },
    _group_account: {
      type: DataTypes.STRING(25),
      allowNull: false,
      primaryKey: true
    }
  }, {
    sequelize,
    tableName: 'group_announce',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "_session_id" },
          { name: "_timestamp" },
        ]
      },
    ]
  });
};
